<?xml version="1.0" encoding="UTF-8"?>
<!--
To change this template, choose Tools | Templates
and open the template in the editor.
-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:f="http://java.sun.com/jsf/core" xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:ice="http://www.icesoft.com/icefaces/component"  xmlns:h="http://java.sun.com/jsf/html" >
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
        <title>TODO supply a title</title>
    </head>
    <body style="border: solid 0px red">        
        <ice:form >
            <ice:panelGroup style=" width:1000px;height:420px; border:solid 0px red ">
                <ice:panelCollapsible  toggleOnClick="#{!botoes.controllerPagina.imediato}" actionListener="#{botoes.controllerPagina.trocaPainel1}" styleClass="iceForm" id="linkPanel"  expanded="#{botoes.controllerPagina.flagPanelFormulario}" style="">
                    <f:facet name="header">
                        <ice:panelGroup style="color: black; width: 100%">
                            <ice:outputText  id="linkHeader" value="Formulário:"/>
                            <ui:insert name="titulo"/>
                        </ice:panelGroup>
                    </f:facet>
                    <ice:panelGroup  rendered="#{botoes.controllerPagina.formularioDesabilitado}" style="border:solid 0px red; position: absolute;height: 340px;width: 100%; background-image: url(resources/FormBloqueado.png)">
                    </ice:panelGroup>
                    <ice:panelGrid   style="text-align: center; border:solid 0px blue;height:365px ; z-index: 1" width="100%">
                        <!-- FORMULARIO -->
                        <ice:panelGrid  style="margin: 0; text-align: center;  border:solid 0px red ; width:100%; height: 100%">
                            <ice:panelGrid style="text-align: left; margin: 0 auto ; font-size: 13px" id="panelCampos">
                                <ui:insert name="formulario"/>
                                 <ice:messages globalOnly="true" showDetail="true" showSummary="true" style="font-size: small; text-align: center; color: red"/>
                            </ice:panelGrid>
                            
                        </ice:panelGrid>
                       
                    </ice:panelGrid>
                    <ice:panelGrid columns="4" style="border:solid 0px red;width:120px;  margin-left:34px; margin-top:-26px">
                        <ice:commandButton style="margin-left:0px " rendered="#{botoes.controllerPagina.formularioDesabilitado}" image="resources/botInserir.png"  actionListener="#{botoes.controllerPagina.inserir}"/>
                        <ice:commandButton style="margin-left:43px " rendered="#{!botoes.controllerPagina.formularioDesabilitado}" image="resources/botSalvar.png"  actionListener="#{botoes.controllerPagina.salvarRegistro}"/>
                        <ice:commandButton style="margin-left:42px; " rendered="#{!botoes.controllerPagina.formularioDesabilitado}" image="resources/botCancelar.png" immediate="true" actionListener="#{botoes.controllerPagina.cancelar}"/>
                        <ice:commandButton rendered="#{botoes.controllerPagina.formularioDesabilitado}" style="margin-left:51px; " image="resources/botExcluir.png" actionListener="#{confirmaExclusao.abrirConfirmacaoDeExclusao}"/>
                    </ice:panelGrid>

                </ice:panelCollapsible>
                <!--CONSULTA-->
                <ice:panelCollapsible toggleOnClick="#{!botoes.controllerPagina.imediato}" actionListener="#{botoes.controllerPagina.trocaPainel}" styleClass="iceConsultabl" style="border:solid 0px red"  id="formPanel" expanded="#{botoes.controllerPagina.flagPanelConsulta}">
                    <f:facet   name="header">
                        <ice:panelGroup style="color: black">
                            <ice:outputText  id="formHeader" value="Consulta:"/>
                              <ui:insert name="titulo"/>
                        </ice:panelGroup>
                    </f:facet>
                    <ice:panelGrid style=" border:solid 0px red; " columns="7">
                        <ice:outputText  style="font-weight: bold" value="Coluna:"/>
                        <ice:selectOneMenu binding="#{consultaSimples.somCampo}" id="coluna" style="width:130px">
                            <f:selectItems value="#{botoes.controllerPagina.colunas}"/>
                        </ice:selectOneMenu>
                        <ice:selectOneMenu binding="#{consultaSimples.somOperador}" id="operador" valueChangeListener="#{consultaSimples.processarOperador}">
                            <f:selectItems value="#{botoes.controllerPagina.operadores}"/>
                        </ice:selectOneMenu>
                        <ice:inputText binding="#{consultaSimples.itTexto}" actionListener="#{consultaSimples.consultar}" converter="#{consultaSimples.conversor}" id="itTexto" style="width:250px"/>
                        <ice:commandButton value="Consultar" actionListener="#{consultaSimples.consultar}" image="/resources/botConsultar.png" title="Consulta Simples" />
                        <ice:panelGroup style="width: 280px; text-align: center">
                            <ice:message  errorClass="errorMessage" showDetail="true" fatalClass="fatalMessage" style="border: solid 1px red; color: red;" for="itTexto" id="messageitTexto" infoClass="infoMessage" showSummary="true" warnClass="warnMessage"/>
                            <ice:messages errorClass="errorMessage" fatalClass="fatalMessage" globalOnly="true" id="messages1" infoClass="infoMessage"
                                          showDetail="true" showSummary="true" style="color: red; border:solid 1px red" warnClass="warnMessage"/>
                        </ice:panelGroup>
                        <ice:commandButton  actionListener="#{botoes.controllerPagina.recarregarTabela}" image="/resources/botRecarregar.png" immediate="true" title="Recarregar a Tabela com todos os Dados" />


                    </ice:panelGrid>

                    <ice:panelGrid   style="border:solid 0px red; height:330px" >
                        <ice:panelGroup  style="text-align: center; width: 995px; overflow: auto; border: solid 0px red; height: 300px" >
                            <ice:dataTable resizable="true"  cellpadding="0" headerClass="icelist-header"  binding="#{botoes.controllerPagina.tabela}"
                                           rowClasses="icelist-row-even,icelist-row-odd" clientOnly="true" style="margin-top:-3px; width:100%;"
                                           value="#{botoes.controllerPagina.rowModel}"  >
                                <ice:column rendered="false">
                                    <ice:rowSelector  selectionListener="#{botoes.controllerPagina.listenerSelecaoTabela}" clickedRow="-1" enhancedMultiple="false"
                                                      multiple="false" preStyleOnSelection="true"  value="#{botoes.controllerPagina.dataTableOneRowSelected}" />
                                </ice:column>
                                <ice:columns  value="#{botoes.controllerPagina.columnsModel}" var="headings">
                                    <ice:outputText  value="#{botoes.controllerPagina.cellValue}"/>
                                    <f:facet name="header">
                                        <ice:outputText value="#{headings}"/>
                                    </f:facet>
                                </ice:columns>
                            </ice:dataTable>

                            <div style="height: 25px; margin: 0 auto; width:110px; border: solid 0px red  ">
                                <ice:panelGrid columns="4">
                                    <ice:commandButton  image="resources/botPrimeiraPag.png" rendered="#{botoes.controllerPagina.paginaAtual != 0}"  title="Primeira Página" action="#{botoes.controllerPagina.primeiraPagina}"/>
                                    <ice:commandButton  image="resources/botPaginaAnt.png" rendered="#{botoes.controllerPagina.paginaAtual != 0}" style="margin-left: 10px" title="Página Anterior" action="#{botoes.controllerPagina.anterior}"/>
                                    <ice:commandButton  image="resources/botProximaPag.png" rendered="#{botoes.controllerPagina.total &gt; botoes.controllerPagina.proximaPagina}" style="margin-left: 10px"  title="Próxima Página"  action="#{botoes.controllerPagina.proxima}"/>
                                    <ice:commandButton  image="resources/botUltimaPag.png" title="Última Página" style="margin-left: 10px" rendered="#{botoes.controllerPagina.total &gt; botoes.controllerPagina.proximaPagina}"  action="#{botoes.controllerPagina.ultimaPagina}"/>
                                </ice:panelGrid>
                            </div>

                        </ice:panelGroup>
                        <ice:panelGrid style=" text-align: left" columns="2">
                            <ice:commandButton title="Alterar Registro Selecionado na Tabela" style="margin-left:20px;" image="resources/botAlterar.png" actionListener="#{botoes.controllerPagina.editar}"/>
                            <ice:commandButton style="margin-left:20px; " image="resources/botConsultaDetalhada.png" title="Abrir Consulta Detalhada" actionListener="#{consultaComplexa.abrirConsultaComplexa}"/>
                        </ice:panelGrid>
                    </ice:panelGrid>
                </ice:panelCollapsible>
            </ice:panelGroup>
        </ice:form>
    </body>
</html>
